INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR})
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/examples/)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/examples/coap)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/examples/device-shadow)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/examples/http)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/examples/http2)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/examples/linkkit)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/examples/mqtt)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/examples/subdev)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/examples/uOTA)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/include)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/include/exports)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/include/imports)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/board)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/infra)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/infra/log)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/infra/system)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/infra/utils)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/infra/utils/digest)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/infra/utils/misc)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/protocol)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/protocol/alcs)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/protocol/coap)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/protocol/http)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/protocol/http2)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/protocol/http2/nghttp2)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/protocol/mqtt)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/protocol/mqtt/MQTTPacket)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/protocol/mqtt/client)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/hal)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/hal/os)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/hal/os/macos)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/hal/os/ubuntu)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/hal/os/win7)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/hal/ssl)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/hal/ssl/itls)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/hal/ssl/mbedtls)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/hal/ssl/openssl)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/tls)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/tls/include)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/tls/include/mbedtls)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/tls/include/mbedtls/uOTA_required)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/tls/library)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/ref-impl/tls/library/uOTA_required)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/sdk-impl)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/security)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/security/pro)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/security/pro/crypto)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/security/pro/id2)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/security/pro/itls)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/security/pro/km)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/file_upload)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/linkkit)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/linkkit/cm)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/linkkit/cm/example)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/linkkit/dm)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/linkkit/dm/example)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/shadow)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/subdev)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/uOTA)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/uOTA/hal)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/uOTA/inc)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/uOTA/src)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/uOTA/src/download)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/uOTA/src/otalib)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/uOTA/src/service)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/uOTA/src/transport)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/uOTA/src/utility)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/uOTA/src/utility/crc)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/services/uOTA/src/verify)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/tools)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/tools/linkkit_tsl_convert)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/tools/linkkit_tsl_convert/include)
INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/tools/linkkit_tsl_convert/src)

ADD_EXECUTABLE (mqtt-example
    mqtt/mqtt-example.c
)
ADD_EXECUTABLE (mqtt_rrpc-example
    mqtt/mqtt_rrpc-example.c
)
ADD_EXECUTABLE (mqtt_multi_thread-example
    mqtt/mqtt_multi_thread-example.c
)
ADD_EXECUTABLE (ota_mqtt-example
    uOTA/ota_mqtt-example.c
)
ADD_EXECUTABLE (uota_app-example
    uOTA/uota_app-example.c
)
ADD_EXECUTABLE (http-example
    http/http-example.c
)
ADD_EXECUTABLE (linkkit-example-solo
    linkkit/linkkit_example_solo.c
)
ADD_EXECUTABLE (linkkit-example-sched
    linkkit/linkkit_example_sched.c
)

TARGET_LINK_LIBRARIES (mqtt-example iot_sdk)
TARGET_LINK_LIBRARIES (mqtt-example iot_hal)
TARGET_LINK_LIBRARIES (mqtt-example iot_tls)
IF (NOT MSVC)
TARGET_LINK_LIBRARIES (mqtt-example pthread)
ENDIF (NOT MSVC)
TARGET_LINK_LIBRARIES (mqtt-example rt)

TARGET_LINK_LIBRARIES (mqtt_rrpc-example iot_sdk)
TARGET_LINK_LIBRARIES (mqtt_rrpc-example iot_hal)
TARGET_LINK_LIBRARIES (mqtt_rrpc-example iot_tls)
IF (NOT MSVC)
TARGET_LINK_LIBRARIES (mqtt_rrpc-example pthread)
ENDIF (NOT MSVC)
TARGET_LINK_LIBRARIES (mqtt_rrpc-example rt)

TARGET_LINK_LIBRARIES (mqtt_multi_thread-example iot_sdk)
TARGET_LINK_LIBRARIES (mqtt_multi_thread-example iot_hal)
TARGET_LINK_LIBRARIES (mqtt_multi_thread-example iot_tls)
IF (NOT MSVC)
TARGET_LINK_LIBRARIES (mqtt_multi_thread-example pthread)
ENDIF (NOT MSVC)
TARGET_LINK_LIBRARIES (mqtt_multi_thread-example rt)

TARGET_LINK_LIBRARIES (ota_mqtt-example iot_sdk)
TARGET_LINK_LIBRARIES (ota_mqtt-example iot_hal)
TARGET_LINK_LIBRARIES (ota_mqtt-example iot_tls)
IF (NOT MSVC)
TARGET_LINK_LIBRARIES (ota_mqtt-example pthread)
ENDIF (NOT MSVC)
TARGET_LINK_LIBRARIES (ota_mqtt-example rt)

TARGET_LINK_LIBRARIES (uota_app-example iot_sdk)
TARGET_LINK_LIBRARIES (uota_app-example iot_hal)
TARGET_LINK_LIBRARIES (uota_app-example iot_tls)
IF (NOT MSVC)
TARGET_LINK_LIBRARIES (uota_app-example pthread)
ENDIF (NOT MSVC)
TARGET_LINK_LIBRARIES (uota_app-example rt)

TARGET_LINK_LIBRARIES (http-example iot_sdk)
TARGET_LINK_LIBRARIES (http-example iot_hal)
TARGET_LINK_LIBRARIES (http-example iot_tls)
IF (NOT MSVC)
TARGET_LINK_LIBRARIES (http-example pthread)
ENDIF (NOT MSVC)
TARGET_LINK_LIBRARIES (http-example rt)

TARGET_LINK_LIBRARIES (linkkit-example-solo iot_sdk)
TARGET_LINK_LIBRARIES (linkkit-example-solo iot_hal)
TARGET_LINK_LIBRARIES (linkkit-example-solo iot_tls)
IF (NOT MSVC)
TARGET_LINK_LIBRARIES (linkkit-example-solo pthread)
ENDIF (NOT MSVC)
TARGET_LINK_LIBRARIES (linkkit-example-solo rt)

TARGET_LINK_LIBRARIES (linkkit-example-sched iot_sdk)
TARGET_LINK_LIBRARIES (linkkit-example-sched iot_hal)
TARGET_LINK_LIBRARIES (linkkit-example-sched iot_tls)
IF (NOT MSVC)
TARGET_LINK_LIBRARIES (linkkit-example-sched pthread)
ENDIF (NOT MSVC)
TARGET_LINK_LIBRARIES (linkkit-example-sched rt)

